package com.treegames.rpghelper.sheet.classes;

import java.util.ArrayList;
import java.util.List;

import com.treegames.rpghelper.feats.ArmorProficienceHeavy;
import com.treegames.rpghelper.feats.ArmorProficienceLight;
import com.treegames.rpghelper.feats.ArmorProficienceMedium;
import com.treegames.rpghelper.feats.GreaterFortitude;
import com.treegames.rpghelper.feats.ShieldProficience;
import com.treegames.rpghelper.feats.WeaponProficienceMartial;
import com.treegames.rpghelper.feats.WeaponProficienceSimple;
import com.treegames.rpghelper.sheet.CharacterPlayer;
import com.treegames.rpghelper.sheet.skills.Craft;
import com.treegames.rpghelper.sheet.skills.HandleAnimal;
import com.treegames.rpghelper.sheet.skills.Initiative;
import com.treegames.rpghelper.sheet.skills.Intimidate;
import com.treegames.rpghelper.sheet.skills.Perception;
import com.treegames.rpghelper.sheet.skills.Ride;
import com.treegames.rpghelper.sheet.skills.ISkill;
import com.treegames.rpghelper.sheet.skills.Athletics;
import com.treegames.rpghelper.util.StatModifier;


//Guerreiro
public class Fighter implements IJob {
	final int firstHitPoints = 20 ;
	final int hitPointsPerLevel = 5;
	//final List<Skill> classSkills = new ArrayList<Skill>(){Athletics};
	private List<ISkill> classSkills = new ArrayList<ISkill>();
	private int skillPoints;
	
	public Fighter(){
		initializeClassSkills();
	}
	
	public void initializeClassSkills(){
		classSkills.add(new Athletics());
		classSkills.add(new HandleAnimal());
		classSkills.add(new Ride());
		classSkills.add(new Initiative());
		classSkills.add(new Intimidate());
		classSkills.add(new Craft());
		classSkills.add(new Perception());
	}
	
	public void levelUp(CharacterPlayer charac){
		if(charac.getJobList().size() == 0){
			charac.setHitPoints(firstHitPoints +  StatModifier.calcStatMod(charac.getStats().getConstitution()));
			skillPoints = 2 + StatModifier.calcStatMod(charac.getStats().getIntelligence());
						
			charac.getFeats().add(new ArmorProficienceLight());
			charac.getFeats().add(new ArmorProficienceMedium());
			charac.getFeats().add(new ArmorProficienceHeavy());
			charac.getFeats().add(new WeaponProficienceSimple());
			charac.getFeats().add(new WeaponProficienceMartial());
			charac.getFeats().add(new ShieldProficience());
			charac.getFeats().add(new GreaterFortitude());
			
		}else{
			charac.setHitPoints(charac.getHitPoints() + hitPointsPerLevel +  StatModifier.calcStatMod(charac.getStats().getConstitution()));
		}
		
		
	}
}
